package iit.projects.etaxi.model.entity;

import java.io.Serializable;

public class Sequence implements Serializable {

	private static final long serialVersionUID = 3332090952713837047L;

	private String seqName;
	
	private String prefix;
	
	private int increment;
	
	private Long currval;
	
	private int idLength;
	
	private char injectCharacter;
	
	public Sequence() {
	}
	
	public void setSeqName(String seqName) {
		this.seqName = seqName;
	}

	public String getSeqName() {
		return seqName;
	}

	public void setPrefix(String prefix) {
		this.prefix = prefix;
	}

	public String getPrefix() {
		return prefix;
	}

	public void setIncrement(int increment) {
		this.increment = increment;
	}

	public int getIncrement() {
		return increment;
	}

	public void setCurrval(Long currval) {
		this.currval = currval;
	}

	public Long getCurrval() {
		return currval;
	}

	public void setIdLength(int idLength) {
		this.idLength = idLength;
	}
	
	public int getIdLength() {
		return idLength;
	}

	public char getInjectCharacter() {
		return injectCharacter;
	}

	public void setInjectCharacter(char injectCharacter) {
		this.injectCharacter = injectCharacter;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getSeqName() == null) ? 0 : getSeqName().hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof Sequence))
			return false;
		Sequence other = (Sequence) obj;
		if (getSeqName() == null) {
			if (other.getSeqName() != null)
				return false;
		} else if (!getSeqName().equals(other.getSeqName()))
			return false;
		return true;
	}
	
	
}
